<update id="{{statementName}}">
    UPDATE {{table}}
    <set>
        {{#properties}}
            {{^value.primaryKey}}
                {{^value.version}}
                    {{#selective}}
                    <if test="{{#testNotNull}} __entity.{{key}}{{/testNotNull}}">
                    {{/selective}}
                    {{value.name}} = #{ __entity.{{key}}{{#value.jdbcType}}
                    ,jdbcType={{value.jdbcType}}{{/value.jdbcType}}{{#value.typeHandler}}
                    ,typeHandler={{value.typeHandler.name}}{{/value.typeHandler}} },
                    {{#selective}}</if>{{/selective}}
                {{/value.version}}
                {{#value.version}}
                    {{value.name}} = {{value.name}} + 1,
                {{/value.version}}
            {{/value.primaryKey}}
        {{/properties}}
    </set>
    <where>
        {{#byId}}
            <include refid="__where_clause_by_fixed_id"/>
        {{/byId}}
        {{^byId}}
            <include refid="__where_clause_by_entity"/>
        {{/byId}}
        {{#properties}}
            {{#value.version}}
                AND
                {{value.name}} = #{ __entity.{{key}}{{#value.jdbcType}}
                ,jdbcType={{value.jdbcType}}{{/value.jdbcType}}{{#value.typeHandler}}
                ,typeHandler={{value.typeHandler.name}}{{/value.typeHandler}} }
            {{/value.version}}
        {{/properties}}
    </where>
</update>
